package com.briup.corejava.day08.pojo;

/**
 * 继承的父类
 */
public class Animal {
    private String name;
    private int age;
    protected double weight;
    String desc = "父类描述";

    // 空参
    public Animal(){
        System.out.println("父类的空参构造器...");
    }
    // 全参
    public Animal(String name, int age, double weight, String desc) {
        System.out.println("父类的全参构造器...");
        this.name = name;
        this.age = age;
        this.weight = weight;
        this.desc = desc;
    }

    public void show(){
        System.out.println(name);
    }
    private void run(){
        System.out.println(desc);
    }
}
